home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libgtop.idb / usr / freeware / include / glibtop / sysdeps.h.z / sysdeps.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  3.4 KB  |  111 lines

  1. /* $Id: sysdeps.h,v 1.20 1999/02/23 11:43:20 martin Exp $ */
  2.  
  3. /* Copyright (C) 1998-99 Martin Baulig
  4.    This file is part of LibGTop 1.0.
  5.  
  6.    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
  7.  
  8.    LibGTop is free software; you can redistribute it and/or modify it
  9.    under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2 of the License,
  11.    or (at your option) any later version.
  12.  
  13.    LibGTop is distributed in the hope that it will be useful, but WITHOUT
  14.    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15.    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16.    for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with LibGTop; see the file COPYING. If not, write to the
  20.    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.    Boston, MA 02111-1307, USA.
  22. */
  23.  
  24. #ifndef __GLIBTOP_SYSDEPS_H__
  25. #define __GLIBTOP_SYSDEPS_H__
  26.  
  27. #include <glibtop.h>
  28.  
  29. BEGIN_LIBGTOP_DECLS
  30.  
  31. #define GLIBTOP_SYSDEPS_FEATURES    0
  32. #define GLIBTOP_SYSDEPS_CPU        1
  33. #define GLIBTOP_SYSDEPS_MEM        2
  34. #define GLIBTOP_SYSDEPS_SWAP        3
  35. #define GLIBTOP_SYSDEPS_UPTIME        4
  36. #define GLIBTOP_SYSDEPS_LOADAVG        5
  37. #define GLIBTOP_SYSDEPS_SHM_LIMITS    6
  38. #define GLIBTOP_SYSDEPS_MSG_LIMITS    7
  39. #define GLIBTOP_SYSDEPS_SEM_LIMITS    8
  40. #define GLIBTOP_SYSDEPS_PROCLIST    9
  41. #define GLIBTOP_SYSDEPS_PROC_STATE    10
  42. #define GLIBTOP_SYSDEPS_PROC_UID    11
  43. #define GLIBTOP_SYSDEPS_PROC_MEM    12
  44. #define GLIBTOP_SYSDEPS_PROC_TIME    13
  45. #define GLIBTOP_SYSDEPS_PROC_SIGNAL    14
  46. #define GLIBTOP_SYSDEPS_PROC_KERNEL    15
  47. #define GLIBTOP_SYSDEPS_PROC_SEGMENT    16
  48. #define GLIBTOP_SYSDEPS_PROC_ARGS    17
  49. #define GLIBTOP_SYSDEPS_PROC_MAP    18
  50. #define GLIBTOP_SYSDEPS_MOUNTLIST    19
  51. #define GLIBTOP_SYSDEPS_FSUSAGE        20
  52. #define GLIBTOP_SYSDEPS_NETLOAD        21
  53. #define GLIBTOP_SYSDEPS_PPP        22
  54.  
  55. #define GLIBTOP_MAX_SYSDEPS        23
  56.  
  57. #define GLIBTOP_SYSDEPS_ALL        ((1 << GLIBTOP_MAX_SYSDEPS) - 1)
  58.  
  59. typedef void (*glibtop_init_func_t) (glibtop *);
  60. extern glibtop_init_func_t _glibtop_init_hook_s [];
  61. extern glibtop_init_func_t _glibtop_init_hook_p [];
  62.  
  63. typedef struct _glibtop_sysdeps    glibtop_sysdeps;
  64.  
  65. struct _glibtop_sysdeps
  66. {
  67.     u_int64_t flags,
  68.         features,        /* server features    */
  69.         cpu,            /* glibtop_cpu        */
  70.         mem,            /* glibtop_mem        */
  71.         swap,            /* glibtop_swap        */
  72.         uptime,            /* glibtop_uptime    */
  73.         loadavg,        /* glibtop_loadavg    */
  74.         shm_limits,        /* glibtop_shm_limits    */
  75.         msg_limits,        /* glibtop_msg_limits    */
  76.         sem_limits,        /* glibtop_sem_limits    */
  77.         proclist,        /* glibtop_proclist    */
  78.         proc_state,        /* glibtop_proc_state    */
  79.         proc_uid,        /* glibtop_proc_uid    */
  80.         proc_mem,        /* glibtop_proc_mem    */
  81.         proc_time,        /* glibtop_proc_time    */
  82.         proc_signal,        /* glibtop_proc_signal    */
  83.         proc_kernel,        /* glibtop_proc_kernel    */
  84.         proc_segment,        /* glibtop_proc_segment    */
  85.         proc_args,        /* glibtop_proc_args    */
  86.         proc_map,        /* glibtop_proc_map    */
  87.         mountlist,        /* glibtop_mountlist    */
  88.         fsusage,        /* glibtop_fsusage    */
  89.         netload,        /* glibtop_netload    */
  90.         ppp;            /* glibtop_ppp        */
  91. };
  92.  
  93. #define glibtop_get_sysdeps(sysdeps)    glibtop_get_sysdeps_r(glibtop_global_server,sysdeps)
  94.  
  95. void glibtop_get_sysdeps_r (glibtop *server, glibtop_sysdeps *buf);
  96.  
  97. #ifdef GLIBTOP_NAMES
  98.  
  99. /* You need to link with -lgtop_names to get this stuff here. */
  100.  
  101. extern const char *glibtop_names_sysdeps [];
  102. extern const unsigned glibtop_types_sysdeps [];
  103. extern const char *glibtop_labels_sysdeps [];
  104. extern const char *glibtop_descriptions_sysdeps [];
  105.  
  106. #endif
  107.  
  108. END_LIBGTOP_DECLS
  109.  
  110. #endif
  111.